require("node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker3.min.css")
require("node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js");
require("node_modules/bootstrap-datepicker/dist/locales/bootstrap-datepicker.zh-CN.min.js");

var datepicker = {
	create: function(dom){
		if(!(dom instanceof jQuery)){
			return;
		}
		dom.datepicker({
			autoclose: true,
			format: "yyyy-mm-dd",
			todayBtn: "linked",
			todayHighlight: true,
			toggleActive: true,
			endDate: "0d",
			language: "zh-CN"
		});
	},
	createLaterPicker: function(dom){
		if(!(dom instanceof jQuery)){
			return;
		}
		dom.datepicker({
			autoclose: true,
			format: "yyyy-mm-dd",
			todayBtn: "linked",
			todayHighlight: true,
			toggleActive: true,
			startDate: "0d",
			language: "zh-CN"
		});
	}
};

module.exports = datepicker;
